package com.huawei.hms.common.api;

import com.huawei.hms.common.internal.Preconditions;
import com.huawei.hms.support.api.client.Result;
import com.huawei.hms.support.api.client.Status;

public class BooleanResult extends Result {
    private final Status mStatus;
    private final boolean resultValue;

    public BooleanResult(Status status, boolean z) {
        this.mStatus = (Status) Preconditions.checkNotNull(status, "Status must not be null");
        this.resultValue = z;
    }

    public Status getStatus() {
        return this.mStatus;
    }

    public boolean getValue() {
        return this.resultValue;
    }

    public final int hashCode() {
        return (this.resultValue ? 1 : 0) + ((this.mStatus.hashCode() + 527) * 31);
    }

    public final boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof BooleanResult)) {
            return false;
        }
        BooleanResult booleanResult = (BooleanResult) obj;
        if (this.mStatus.equals(booleanResult.mStatus) && this.resultValue == booleanResult.resultValue) {
            return true;
        }
        return false;
    }
}
